var SearchForm = function () {
  var template = /* html */ `
    <div>
      <sys-common-search request-url="materialSelectFilter/getMaterialSelectData" :request-data="{type:4}" :search="search"
        :search-field="searchField" label-width="100px" input-width="200px">
        <template slot="append">
          <el-form-item label="仓库">
            <el-select style="width:200px" clearable v-model="search.warehouseType" placeholder="请选择仓库">
              <el-option v-for="warehouseType in warehouseTypeList" :key="warehouseType.value" :label="warehouseType.label" :value="warehouseType.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="是否有库存">
            <el-select style="width:200px" clearable v-model="search.isValid" placeholder="请选择是否有库存">
              <el-option :value="0" label="无库存数"></el-option>
              <el-option :value="1" label="有库存数"></el-option>
            </el-select>
          </el-form-item>
        </template>
      </sys-common-search>
    </div>
  `;

  return {
    props: {
      search: {
        type: Object,
        required: true
      }
    },

    data: function () {
      return {
        searchField: ['materialName', 'model', 'color', 'providerName', 'materialDept', 'providerNo'],
        warehouseTypeList: i18n.getDropDown('warehouseInOutRecord.warehouseType', [4, 5, 2, 3, 6])
      };
    },

    components: {
      SysCommonSearch: SysCommonSearch
    },

    template: template
  };
}();
